<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/*
<span class='line'>  2</span>  * $Id: om-progressbar.js,v 1.14 2012/03/15 06:14:47 linxiaomin Exp $
<span class='line'>  3</span>  * operamasks-ui omProgressbar @VERSION
<span class='line'>  4</span>  *
<span class='line'>  5</span>  * Copyright 2012, AUTHORS.txt (http://ui.operamasks.org/about)
<span class='line'>  6</span>  * Dual licensed under the MIT or LGPL Version 2 licenses.
<span class='line'>  7</span>  * http://ui.operamasks.org/license
<span class='line'>  8</span>  *
<span class='line'>  9</span>  * http://ui.operamasks.org/docs/
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * Depends:
<span class='line'> 12</span>  *  om-core.js
<span class='line'> 13</span>  */</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="COMM">/** 
<span class='line'> 15</span>  * @name omProgressbar
<span class='line'> 16</span>  * @class 进度条一般用来呈现任务完成的进度情况。&lt;br/>
<span class='line'> 17</span>  * &lt;b>示例：&lt;/b>&lt;br/>
<span class='line'> 18</span>  * &lt;pre>
<span class='line'> 19</span>  * &lt;script type="text/javascript" &gt;
<span class='line'> 20</span>  * $(document).ready(function() {
<span class='line'> 21</span>  *     $('#selector').omProgressbar({
<span class='line'> 22</span>  *         value : 30
<span class='line'> 23</span>  *     });
<span class='line'> 24</span>  * });
<span class='line'> 25</span>  * &lt;/script&gt;
<span class='line'> 26</span>  * 
<span class='line'> 27</span>  * &lt;div id="selector" /&gt;
<span class='line'> 28</span>  * &lt;/pre>
<span class='line'> 29</span>  * @constructor
<span class='line'> 30</span>  * @description 构造函数. 
<span class='line'> 31</span>  * @param p 标准config对象：{}
<span class='line'> 32</span>  * @example
<span class='line'> 33</span>  * $('#selector').omProgressbar();
<span class='line'> 34</span>  */</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="PUNC">;</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">$</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">	
<span class='line'> 37</span> </span><span class="NAME">$.omWidget</span><span class="PUNC">(</span><span class="STRN">"om.omProgressbar"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">		
<span class='line'> 39</span> 	</span><span class="NAME">options</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="COMM">/**@lends omProgressbar#*/</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'> 41</span>          * 进度值，默认值为0，最大值为100
<span class='line'> 42</span>          * @type Number
<span class='line'> 43</span>          * @default 0
<span class='line'> 44</span>          * @example
<span class='line'> 45</span>          * $("#selector").omProgressbar({value:50});
<span class='line'> 46</span>          */</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">		
<span class='line'> 49</span> 		</span><span class="COMM">/**
<span class='line'> 50</span>          * 提示内容，默认的内容格式为{value}%，如当进度值为30时，显示的文本为30%; 并且支持方法自定义提示内容，
<span class='line'> 51</span>          * 方法提供一个参数为当前的进度值，返回值为提示内容。
<span class='line'> 52</span>          * @type String, Function
<span class='line'> 53</span>          * @default "{value}%"
<span class='line'> 54</span>          * @example
<span class='line'> 55</span>          * $("#selector").omProgressbar({text: "已完成{value}%"});
<span class='line'> 56</span>          */</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">		</span><span class="NAME">text</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"{value}%"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'> 59</span>          * 设置进度条的宽度,单位为像素,默认值为"auto"自适应宽度。
<span class='line'> 60</span>          * @type Number,String
<span class='line'> 61</span>          * @default auto
<span class='line'> 62</span>          * @example
<span class='line'> 63</span>          * $("#selector").omProgressbar({width: 300});
<span class='line'> 64</span>          */</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">		</span><span class="NAME">width</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"auto"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">		
<span class='line'> 67</span> 		</span><span class="NAME">max</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 69</span> 
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="NAME">min</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 71</span> 
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="NAME">_create</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">$ele</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">		</span><span class="NAME">$ele.addClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">"om-progressbar om-widget om-widget-content om-corner-all"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">        </span><span class="NAME">this.textDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">"&lt;div class='om-progressbar-text'>&lt;/div>"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">appendTo</span><span class="PUNC">(</span><span class="NAME">$ele</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="NAME">this.valueDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">"&lt;div class='om-progressbar-value om-widget-header om-corner-left'>&lt;/div>"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">			</span><span class="PUNC">.</span><span class="NAME">appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$ele</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">	
<span class='line'> 80</span> 	</span><span class="NAME">_init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.element.width</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.options.width</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">            </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.options.width</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">            </span><span class="NAME">this.element.width</span><span class="PUNC">(</span><span class="NAME">width</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">	    
<span class='line'> 87</span> 	    </span><span class="NAME">this.textDiv.width</span><span class="PUNC">(</span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">width</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">	    </span><span class="NAME">this.oldValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._value</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">        </span><span class="NAME">this._refreshValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> 
<span class='line'> 91</span> 	</span><span class="COMM">/**
<span class='line'> 92</span>      * 获取或者设置进度值。没有传入参数时，该方法为获取当前进度值，反之，则设置当前进度值。
<span class='line'> 93</span>      * @name omProgressbar#value
<span class='line'> 94</span>      * @param newValue Number对象 设置进度值
<span class='line'> 95</span>      * @function
<span class='line'> 96</span>      * @example
<span class='line'> 97</span>      * $("#selector").omProgressbar('value', '30');
<span class='line'> 98</span>      * 
<span class='line'> 99</span>      */</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">	</span><span class="NAME">value</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">newValue</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">newValue</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._value</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>104</span> 
<span class='line'>105</span> </span><span class="WHIT">		</span><span class="NAME">this.options.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">        </span><span class="NAME">this._refreshValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span> 
<span class='line'>109</span> </span><span class="WHIT">	</span><span class="NAME">_value</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.options.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">		</span><span class="COMM">// normalize invalid value</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">			</span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.options.max</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.min</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>117</span> 
<span class='line'>118</span> </span><span class="WHIT">	</span><span class="NAME">_percentage</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">this._value</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">this.options.max</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>121</span> 
<span class='line'>122</span> </span><span class="WHIT">	</span><span class="NAME">_refreshValue</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.value</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onChange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.options.onChange</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">percentage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._percentage</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.options.text</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> 
<span class='line'>127</span> </span><span class="WHIT">		</span><span class="NAME">self.valueDiv</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">			</span><span class="PUNC">.</span><span class="NAME">toggle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">self.min</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">			</span><span class="PUNC">.</span><span class="NAME">toggleClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">"om-corner-right"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">self.options.max</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">			</span><span class="PUNC">.</span><span class="NAME">width</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">percentage.toFixed</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"%"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">		
<span class='line'>132</span> 		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">text</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"function"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">			</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">text.call</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">,</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">text</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">			</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">text.replace</span><span class="PUNC">(</span><span class="STRN">"{value}"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">		</span><span class="NAME">self.textDiv.html</span><span class="PUNC">(</span><span class="NAME">label</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">		
<span class='line'>139</span> 		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">self.oldValue</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">			</span><span class="NAME">onChange</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">self._trigger</span><span class="PUNC">(</span><span class="STRN">"onChange"</span><span class="PUNC">,</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="NAME">value</span><span class="PUNC">,</span><span class="NAME">self.oldValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">			</span><span class="NAME">self.oldValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>144</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>145</span> </span><span class="COMM">/**
<span class='line'>146</span>  * 进度值改变触发事件。
<span class='line'>147</span>  * @event
<span class='line'>148</span>  * @name omProgressbar#onChange
<span class='line'>149</span>  * @param newValue 改变后进度值
<span class='line'>150</span>  * @param oldValue 改变前进度值
<span class='line'>151</span>  * @param event jQuery.Event对象
<span class='line'>152</span>  * @example
<span class='line'>153</span>  *  $("#selector").omProgressbar({
<span class='line'>154</span>  *      onChange: function(newValue, oldValue, event){ ... }
<span class='line'>155</span>  *  });
<span class='line'>156</span>  */</span><span class="WHIT">
<span class='line'>157</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">jQuery</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>